PS1="`whoami`@`hostname`:"'[$PWD]'
history
USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`
if [ "$USER_IP" = "" ]
then
USER_IP=`hostname`
fi
if [ ! -d /home/his/.his ]
then
mkdir /home/his/.his
chmod 777 /home/his/.his
fi
if [ ! -d /home/his/.his/${LOGNAME} ]
then
mkdir /home/his/.his/${LOGNAME}
chmod 300 /home/his/.his/${LOGNAME}
fi
export HISTSIZE=4096
DT=`date "+%Y-%m-%d_%H:%M:%S"`
export HISTFILE="/home/his/.his/${LOGNAME}/${USER_IP} his.$DT"
chmod 600 /home/his/.his/${LOGNAME}/*his* 2>/dev/null
